home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / FWFrming.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  4.8 KB  |  165 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFrming.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWFRMING_H
  11. #define FWFRMING_H
  12.  
  13. #ifndef FWFRAME_H
  14. #include "FWFrame.h"
  15. #endif
  16.  
  17. // ----- ODF Foundation Includes -----
  18.  
  19. #ifndef FWRUNTYP_H
  20. #include "FWRunTyp.h"
  21. #endif
  22.  
  23. #ifndef FWSTDDEF_H
  24. #include "FWStdDef.h"
  25. #endif
  26.  
  27. //========================================================================================
  28. //    Forward Declarations
  29. //========================================================================================
  30.  
  31. class ODFacet;
  32. class ODShape;
  33. class ODObjectSpec;
  34. class ODDragItemIterator;
  35.  
  36. class FW_CEmbeddingPart;
  37. class FW_MProxy;
  38. class FW_CBorderMouseEvent;
  39. class FW_CEmbeddedMouseEvent;
  40. class FW_CPoint;
  41. class FW_CProxyFrame;
  42. class FW_COpenFileParameters;
  43. class FW_CInsertCommand;
  44. class FW_PFileSpecification;
  45.  
  46. //========================================================================================
  47. //    class FW_CEmbeddingFrame
  48. //========================================================================================
  49.  
  50. class FW_CEmbeddingFrame : public FW_CFrame
  51. {
  52. public:
  53.     FW_DECLARE_CLASS
  54.     FW_DECLARE_AUTO(FW_CEmbeddingFrame)
  55.  
  56. //----------------------------------------------------------------------------------------
  57. //    Initialization/Destruction
  58. //
  59. public:
  60.     FW_CEmbeddingFrame(Environment* ev, 
  61.                         ODFrame* odFrame, 
  62.                         FW_CPresentation* presentation,
  63.                         FW_CEmbeddingPart* part);
  64.     virtual ~ FW_CEmbeddingFrame();
  65.  
  66. //----------------------------------------------------------------------------------------
  67. //    Inherited API
  68. //
  69. public:
  70.     // ----- Adjust Cursor -----
  71.     virtual FW_Handled            AdjustCursor(Environment* ev, 
  72.                                     ODFacet* facet, 
  73.                                     const FW_CPoint& theMousePoint,
  74.                                     ODEventInfo* eventInfo);
  75.     // ----- ViewType -----
  76.     virtual void                ViewTypeChanged(Environment* ev, 
  77.                                     ODTypeToken newViewType, 
  78.                                     ODTypeToken oldViewType);
  79.  
  80.     // ----- Facets -----
  81.     virtual void                 FacetAdded(Environment* ev, 
  82.                                     ODFacet* facet,
  83.                                     unsigned short facetCount);
  84.     virtual void                 FacetRemoved(Environment* ev, 
  85.                                     ODFacet* facet,
  86.                                     unsigned short facetCount);
  87.  
  88.     // ----- Notification -----    
  89.     virtual void                FrameAdded(Environment* ev, ODFrame* odFrame, FW_Boolean fromStorage);
  90.     virtual void                FrameRemoved(Environment* ev, FW_Boolean toStorage);
  91.  
  92.     // ----- Menu Events -----
  93.     virtual FW_Handled            HandleAdjustMenus(Environment* ev, 
  94.                                     FW_CMenuBar* menuBar,
  95.                                     FW_Boolean hasMenuFocus, 
  96.                                     FW_Boolean isRoot);
  97.     virtual FW_Handled            HandleMenu(Environment* ev, 
  98.                                     const FW_CMenuEvent& theMenuEvent);
  99.  
  100.     // ----- Getter -----
  101.     FW_CEmbeddingPart*            GetPart(Environment* ev) const;
  102.                                     
  103. //----------------------------------------------------------------------------------------
  104. //    New API
  105. //
  106. public:
  107.     // ----- Embedded Facets -----
  108.     FW_Boolean                    HasASelectedEmbeddedFacet(Environment* ev) const;
  109.  
  110.     // ----- Insert Command -----
  111.     virtual FW_CInsertCommand*    NewInsertCommand(Environment* ev, 
  112.                                     const FW_PFileSpecification& fileSpec);
  113.     virtual void                DoInsert(Environment *ev, 
  114.                                     FW_COpenFileParameters& openFileParameters);
  115.                                     
  116.     // ----- Embedded frames -----
  117.     virtual FW_MProxy*             EmbeddedFrameRequested(Environment *ev,
  118.                                     FW_MProxy* baseProxy,
  119.                                     ODFrame* baseFrame,
  120.                                     ODShape* frameShape,
  121.                                     ODPart* embeddedPart,
  122.                                     ODTypeToken viewType,
  123.                                     ODTypeToken presentation,
  124.                                     ODID frameGroupID,
  125.                                     FW_Boolean isOverlaid,
  126.                                     FW_Boolean isSubFrame);
  127.     
  128.     FW_MProxy*                    GetProxy(Environment *ev, 
  129.                                     ODFrame* embeddedFrame) const;
  130.  
  131.     // ----- OD to FW conversion -----
  132.     static FW_CEmbeddingFrame*    ODtoFWEmbeddingFrame(Environment* ev, 
  133.                                     ODFrame* odFrame);
  134.  
  135.     // ----- OpenDoc UI -----
  136.     virtual FW_Handled            ShowPartInfo(Environment* ev);
  137.     void                        OpenSelection(Environment* ev);
  138.  
  139. //----------------------------------------------------------------------------------------
  140. //    Public but for Internal use only
  141. //
  142. public:
  143.     ODFrame*                    PrivCreateEmbeddedFrame(Environment* ev, 
  144.                                             ODType frameType,
  145.                                             ODPart *embeddedODPart,
  146.                                             ODShape* frameShape,
  147.                                             ODCanvas* biasCanvas,                // can be null
  148.                                             ODTypeToken viewType,
  149.                                             ODTypeToken presentation,            // can be null
  150.                                             FW_Boolean isOverlaid,
  151.                                             FW_Boolean subFrame);
  152.  
  153.     virtual void                PrivAttachSourceFrame(Environment* ev, 
  154.                                             FW_CFrame* sourceFrame);
  155.                                     
  156.     void                        PrivRemoveEmbeddedFrame(Environment* ev,
  157.                                             FW_CProxyFrame* proxyFrame);    
  158.  
  159.     virtual void                PrivStartStopDragging(Environment *ev, FW_EPrivDraggingFlags dragFlags);
  160.  
  161. };
  162.  
  163. #endif
  164.  
  165.